#ifndef __FLOBJ_H__
#define __FLOBJ_H__

// Gets OpenGL Configurations
#include "../fly.h"
// Imports loader
#include "../libraries/glmobjectloader/glm.h"
#include "../../AABox.h"

class flObj	// flObj Class
{
	private:
		string objPath;	// Path for the .obj
		GLMmodel* model;	// Object loader
		float* maxA;	// Array for Max X, Y, Z
		float* minA;	// Array for Min X, Y, Z
		float* dist;	// Array for Distance (Min - Max)
		float  rad;		// Radius of the bounding sphere
	public:
		flObj();		// Creates object
		flObj(string objPath);	// Creates object
		~flObj();

		string getObjPath(){ return objPath; }	// Return path of the .obj
		void setObjPath( string _objPath ){ objPath = _objPath; }	// Sets path of the .obj

		void load();	// Loads objPath
		void load(string _objPath);	// Loads _obj
		void draw();	// Draws the model
		void drawWiredBBox();	// Draws the Bounding box
		void drawSolidBBox();	// Draws the bounging box solid
		void drawWiredBSphere();	// Draws the bounding sphere
		void populateMaxMin();	// Populates the arrays
		void setAAbox(float x, float y, float z);

		AABox aab;
};

#endif